/**
  ******************************************************************************
* @file				gpio_led.h
* @Software			MDK V5
* @Target 			MM32F533
* @author			ou_teki
* @date				2024-0420
  ******************************************************************************
  */

#ifndef		__GPIO_LED_H__
#define		__GPIO_LED_H__


#ifdef __cplusplus
extern "C" {
#endif

/* Files include */
#include "stdint.h"
#include "stdbool.h"
#include "stdlib.h"
#include "string.h"
#include "stdio.h"

#include  "hal_rcc.h"
#include  "hal_gpio.h"

#define		LED_PORT_1      GPIOB
#define		LED_PIN_1		GPIO_Pin_11
#define		LED_PORT_2      GPIOB
#define		LED_PIN_2       GPIO_Pin_10
#define		LED_PORT_3 		GPIOC
#define		LED_PIN_3		GPIO_Pin_7
#define		LED_PORT_4 		GPIOC
#define		LED_PIN_4		GPIO_Pin_6
//-tk24- 0->LED亮 1->灭 MCU的灌电流大于拉电流
#define		LED1_ON()           LED1_LOW()
#define		LED1_OFF()          LED1_HIGH()
#define		LED2_ON()           LED2_LOW()
#define		LED2_OFF()          LED2_HIGH()
#define		LED3_ON()			LED3_LOW()
#define		LED3_OFF()		    LED3_HIGH()
#define		LED4_ON()			LED4_LOW()
#define		LED4_OFF()		    LED4_HIGH()

#define		LED1_HIGH()			(LED_PORT_1->BSRR = LED_PIN_1)
#define		LED1_LOW()		 	(LED_PORT_1->BRR = LED_PIN_1)
#define		LED2_HIGH()			(LED_PORT_2->BSRR = LED_PIN_2)
#define		LED2_LOW()		 	(LED_PORT_2->BRR = LED_PIN_2)
#define		LED3_HIGH()			(LED_PORT_3->BSRR = LED_PIN_3)
#define		LED3_LOW()		 	(LED_PORT_3->BRR = LED_PIN_3)
#define		LED4_HIGH()			(LED_PORT_4->BSRR = LED_PIN_4)
#define		LED4_LOW()		 	(LED_PORT_4->BRR = LED_PIN_4)

void  LedInit(void);


#ifdef __cplusplus
}
#endif

#endif /* __GPIO_LED_H__ */
/*lint -restore */

